package br.com.sovi.gwt.client.controleunitario;

import br.com.sovi.gwt.client.ImagesImpl;

import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.form.Label;

/**
 * @author João Galli
 *
 */
public class ControleUnitarioMainMenuPanel extends Panel {

	private Label messageLabel;
	
	private ControleUnitarioFiltroController controleUnitarioFiltroController;

	public ControleUnitarioMainMenuPanel(final ControleUnitarioCentralPanel panel, ControleUnitarioListener controleUnitarioListener) {
		controleUnitarioFiltroController = new ControleUnitarioFiltroController(controleUnitarioListener);
		
		this.add(controleUnitarioFiltroController.getPanel());

//		buildEmptyPortalMessage();
//		this.add(messageLabel);
	}

	public void buildEmptyPortalMessage() {
		StringBuilder sb = new StringBuilder();
		sb.append("<table><tr>");
		sb.append("<td>").append(ImagesImpl.get().up().getHTML()).append("</td>");
		sb
				.append("<td><div style='font-size: 12px; font-weight: bold; font-family: Arial'>texto aqui</div></td>");

		messageLabel = new Label();
		messageLabel.setHtml(sb.toString());
	}

	public void hideEmptyPortalMessage() {
		this.remove(messageLabel);
		messageLabel.setVisible(false);
	}
	
}